package oop多态作业;

import oop继承第一章.Car;

public class Circle extends Graph {
    private double radius;

    public Circle(int length, int width, double radius) {
        super(length, width);
        this.radius = radius;
    }


    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public  void area(){
        System.out.print(
                "此圆的面积为"
        );
        System.out.print(3.14*this.radius*this.radius+"\t");
    }
    public void perimeter(){
        System.out.print("此圆的周长为");
        int s=(int)Math.round(3.14*this.radius*2);
        System.out.println(s);
    }
}